
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>       

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>:: THv3 ::</title>        
        <script type='text/javascript'>            

            $(document).ready(function() {
                                           
            });
        </script>
    </head>
    <body>
        <fmt:setLocale value="ms_MY"/>
        <s:useActionBean beanclass="ipfms.stripes.util.ListUtil" var="list"/>
        <s:form beanclass="ipfms.stripes.WelcomeActionBean">   
            <br/>            
            <fieldset class="aras1">
                <legend>SEARCH</legend>
                <div class="content">                  

                    <div id="searchmain">

                        <s:text name="building.buildingName" size="20" class="searchfield"/>
                        <s:select name="building.buildingType.code">
                            <s:option value="">ALL</s:option>
                            <s:options-collection collection="${list.senaraiJenisBangunan}" label="desc" value="code"/>
                        </s:select>
                        <s:select name="building.buildingState.code">
                            <s:option value="">ALL</s:option>
                            <s:options-collection collection="${list.senaraiNegeri}" label="desc" value="code"/>
                        </s:select>                                                    

                        <s:submit name="searchFilter" value="Go" class="searchbutton"/>

                    </div>
                        <img src="images/1_1_empty.gif" width="8" height="20">
                    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="white">
                        <tr bgcolor="#c7ab6e " class="normal_bold">
                            <td width="30" rowspan="2"><div align="center">No</div></td>
                            <td width="124" rowspan="2"><div align="center">Property</div></td>
                            <td width="100" rowspan="2"><div align="center">Property Type</div></td>  
                            <td width="100" colspan="2"><div align="center">Price</div></td>  
                        </tr>
                        <tr bgcolor="#c7ab6e " class="normal_bold">
                            <td width="80" ><div align="center">Rental</div></td>  
                            <td width="80"><div align="center">Sell</div></td>  
                        </tr>
                        <c:forEach items="${actionBean.listOfBuilding}" var="item" varStatus="line">
                            <tr bgcolor="#FFFFFF">
                                <td><div align="center">${line.count}</div></td>
                                <td><div align="center">
                                        <a href="${pageContext.request.contextPath}/property?viewDetail&idBuilding=${item.idBuilding}">
                                            ${item.buildingName}</a>
                                    </div>
                                </td>
                                <td><div align="center">${item.buildingType.desc}</div></td> 
                                <td><div align="center">
                                        <c:if test="${empty item.amtRent}">
                                            -
                                        </c:if>
                                        <c:if test="${!empty item.amtRent}">
                                            <fmt:formatNumber value="${item.amtRent}" type="currency"/> per sq. ft
                                        </c:if>
                                    </div></td> 
                                <td><div align="center">
                                        <c:if test="${empty item.amtSell}">
                                            -
                                        </c:if>
                                        <c:if test="${!empty item.amtSell}">
                                            <fmt:formatNumber value="${item.amtSell}" type="currency"/>
                                        </c:if>                                                        
                                    </div></td> 
                            </tr>                                            
                        </c:forEach>                                        
                    </table>
                </div>
            </fieldset>

        </s:form>
    </body>
</html>